class WhackPawn extends UDKPawn
	placeable config(Game);

var() array< class<Inventory> > InventoryList;
var() bool activated;
var() float ProjectileLifeTime;
var() int ProjectileSpeed;

var AnimNodeSlot FullBodyAnimSlot;
var SkeletalMeshComponent Aikoo;

simulated function PostBeginPlay()
{
	super.PostBeginPlay();	
	FullBodyAnimSlot = AnimNodeSlot(Mesh.FindAnimNode('MyBodySlot'));
	SetInventory();
}

DefaultProperties
{
	ControllerClass= class 'WhackController'
	InventoryManagerClass=class'WhackInventoryManager'
	ProjectileLifeTime=1.6;
	ProjectileSpeed=400;

	Begin Object Class=SkeletalMeshComponent Name=aikoo
		SkeletalMesh=SkeletalMesh'HM.HM' //de skeletal mesh
		PhysicsAsset=PhysicsAsset'HM.HM_Physics'
		AnimSets(0)=AnimSet'HM.Wervel'
		AnimTreeTemplate=AnimTree'HM.AT_HM'
		Translation=(Z=-100)
	End Object

	Mesh=aikoo
	Components.Add(aikoo)
	Aikoo = aikoo;

	Begin Object Name=CollisionCylinder
		CollisionRadius=60
		CollisionHeight=100
	End Object

	Physics=Physics_Falling;
}

event Tick(float deltatime)
{
	
}

/*simulated function StartFire(byte FireModeNum)
{
	if( bNoWeaponFIring )
	{
		return;
	}
	
	if(FireModeNum == 1)
	{
		FightPlayerController(Controller).Block();
	}
	else if( Weapon != None )
	{
		FightPlayerController(Controller).blocking = false;
		Weapon.StartFire(0);
	}
}*/

function SetInventory()
{
	local int i;
	for ( i=0; i<InventoryList.Length; i++ )
	{
		CreateInventory( InventoryList[i], false  );
	}
}

simulated function WeaponFired(Weapon InWeapon, bool bViaReplication, optional vector HitLocation)
{
	`log("Modder en muffins!");
	PlaySlashAnimation();
}
 
simulated function bool CalcCamera(float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV)
{
	return false;
}

function AddDefaultInventory()
{
    //override do nothing
}

function PlayBlockAnimation()
{
	//FullBodyAnimSlot.PlayCustomAnim('bLock',1,0.1,0.1,false,true)
}

function PlaySlashAnimation()
{
	`log('slash');
	FullBodyAnimSlot.PlayCustomAnim('MolGooi',1,0.1,0.1,false,true);
}

function PlayHitAnimation()
{
	//`log('hit');
	//FullBodyAnimSlot.PlayCustomAnim('Hit',1,0.1,0.1,false,true);
}